#ifndef  QQ_CONFIG
#define  QQ_CONFIG

/*define interface config*/

#include <qstring.h>
#include <qdatetime.h>
#include <qpixmap.h>

struct QQUser
{
	QString account;
	QString password;
	QString nickname;
	QString icon;
	QList<QString> friends;
};

enum QQEmojiType
{
	Picture,
	Lottie,
	Gif
};

struct QQChatEmoji
{
	long id;
	QQEmojiType type;
	QString path;
	QString preview;
};
Q_DECLARE_METATYPE(QQChatEmoji)
Q_DECLARE_METATYPE(QQChatEmoji*)

enum QQMessageSenderType
{
	Self,
	Other
};

enum QQMessageType
{
	Text,
	Image,
	File,
	Voice,
	Video,
	Url,
	Mix
};

enum QQMessageSendType
{
	Sended,
	Unsend,
	Sending
};

struct QQChatMessage
{
	long id;
	QString name;
	QString avatar;
	QString time;
	QString content;
	QQMessageType type;
	QQMessageSenderType senderType;
	QQMessageSendType sendType;
};
Q_DECLARE_METATYPE(QQChatMessage)
Q_DECLARE_METATYPE(QQChatMessage*)

struct QQChatIndexItem
{
	long id;
	QString account;
	QString icon;
	QString nickname;
	int keyPoints;
};

struct QQFriendIndexItem
{
	long id;
	QString account;
	QPixmap icon;
	QString nickname;
};

struct QQMessageItem
{
	long id;
	QString sender;
	QString receiver;
	QString content;
	QPixmap icon;
	QString nickname;
};

struct QQFriend :public QQChatIndexItem
{
};

struct QQMessage :public QQChatMessage
{
	QString sender;
	QString receiver;
};

#endif // ! QQ_CONFIG
